<?php

/**
 * Payment form base class.
 *
 * @package    ##PROJECT_NAME##
 * @subpackage form
 * @author     ##AUTHOR_NAME##
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BasePaymentForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'          => new sfWidgetFormInputHidden(),
      'user_id'     => new sfWidgetFormPropelChoice(array('model' => 'sfGuardUser', 'add_empty' => false)),
      'payment_id'  => new sfWidgetFormPropelChoice(array('model' => 'sfGuardUser', 'add_empty' => false)),
      'level_id'    => new sfWidgetFormPropelChoice(array('model' => 'Levelpayment', 'add_empty' => false)),
      'direction'   => new sfWidgetFormInput(),
      'desc'        => new sfWidgetFormInput(),
      'summa'       => new sfWidgetFormInput(),
      'komission'   => new sfWidgetFormInput(),
      'created_at'  => new sfWidgetFormDateTime(),
      'date_expire' => new sfWidgetFormDateTime(),
      'partner_id'  => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'id'          => new sfValidatorPropelChoice(array('model' => 'Payment', 'column' => 'id', 'required' => false)),
      'user_id'     => new sfValidatorPropelChoice(array('model' => 'sfGuardUser', 'column' => 'id')),
      'payment_id'  => new sfValidatorPropelChoice(array('model' => 'sfGuardUser', 'column' => 'id')),
      'level_id'    => new sfValidatorPropelChoice(array('model' => 'Levelpayment', 'column' => 'id')),
      'direction'   => new sfValidatorInteger(array('required' => false)),
      'desc'        => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'summa'       => new sfValidatorNumber(array('required' => false)),
      'komission'   => new sfValidatorNumber(array('required' => false)),
      'created_at'  => new sfValidatorDateTime(array('required' => false)),
      'date_expire' => new sfValidatorDateTime(array('required' => false)),
      'partner_id'  => new sfValidatorInteger(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('payment[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Payment';
  }


}
